import type {InjectionKey} from "vue"

export interface ScrollbarContext{
    scrollbarElement:HTMLDivElement
    wrapElement:HTMLDivElement
}

export const scrollbarContextKey:InjectionKey<ScrollbarContext> =Symbol('scrollbarContextKey')



export const BAR_MAP = {
    vertical: {
        offset: 'offsetHeight',
        scroll: 'scrollTop',
        scrollSize: 'scrollHeight',
        size: 'height',
        key: 'vertical',
        axis: 'Y',
        client: 'clientY',
        direction: 'top',
      },
      horizontal: {
        offset: 'offsetWidth',
        scroll: 'scrollLeft',
        scrollSize: 'scrollWidth',
        size: 'width',
        key: 'horizontal',
        axis: 'X',
        client: 'clientX',
        direction: 'left',
      },

} as const

export const GAP =4